# -*- coding: utf-8 -*-
# @Time    : 2022/10/12 23:32
# @Author  : 修远
# @File    : celeryUtils.py
# @Comment :
from app.app import db
from app.model.ActHistory import ActHistory
from app.app import celery


@celery.task()
def save_act_history(object_id, object_act, remake):
    with db.auto_commit():
        act_history = ActHistory()
        act_history.object_id = object_id
        act_history.object_act = object_act
        act_history.remake = remake
        db.session.add(act_history)


@celery.task()
def add(a, b):
    return a + b
